<template>
  <div>
    <h1>Count:{{ a }}</h1>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Count",
});
</script>

<script setup lang="ts">
import { ref } from "vue";
const a = ref(1);

//defineExpose接受一个对象作为参数,对象内部书写哪些响应式数据允许其他组件通过当前组件实例获取
defineExpose({
  a,
});
</script>

<style scoped lang="scss"></style>
